package com.ticket.sass.common.rpc.dto.output

import io.swagger.annotations.ApiModelProperty

data class ResultWrapOutput<T>(
    @ApiModelProperty(value = "状态码：0 成功，1 失败", required = true)
    val code: Int = Code.OK.value,

    @ApiModelProperty(value = "提示信息", required = true)
    val message: String = "",

    @ApiModelProperty(value = "错误码", required = true)
    val errorCode: String = "",

    @ApiModelProperty(value = "错误信息", required = true)
    val errorMessage: String = "",

    @ApiModelProperty(value = "数据", required = true)
    val data: T? = null
) {

    enum class Code(val value: Int) {
        OK(0),
        ERROR(1)
    }
}
